package com.atguigu.principle.command;

public class Client {
    public static void main(String[] args) {
        LightReceiver lightReceiver=new LightReceiver();
        LightOnCommand lightOnCommand = new LightOnCommand(lightReceiver);
        LightOffCommand lightOffCommand = new LightOffCommand(lightReceiver);

        RemoteController remoteController = new RemoteController();
        remoteController.setCom(0,lightOnCommand,lightOffCommand);

        System.out.println("-------------开---------");
        remoteController.onButton(0);
    }
}
